<template>
  <div class="header">
    <div class="con">warehouse</div>
    <div class="logout" @click="logout">Logout</div>
  </div>
</template>

<script>
export default {
  name: "XHeader",
  data() {
    return {

    }
  },

  methods: {
    logout(){
      localStorage.clear()
      this.$router.push("/")
      this.$message.success("退出登录")

    }

  }
}
</script>

<style scoped lang="less">
.header {
  display:flex;
  flex-direction: row;
  .con {
    height: 120px;
    line-height: 120px;
    text-align: center;
    width: 100%;
    background: rgba(0, 0, 0, 0.56);
    font-weight: 400;
    font-size: 96px;
    color: #FFFFFF;
    

  }
  .logout{
    color:#FFFFFF;
    margin:20px;
  }
  .logout:hover{
    cursor: pointer;
  }
}
</style>